import { USER_INFO, USER_LOGOUT } from '../actionTypes'

function user (state = {}, action) {
  switch (action.type) {
    case USER_INFO:
      return action.payload
    case USER_LOGOUT:
      return {}
    default:
      return state
  }
}

export default user
